Load all required libraries.
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.6 v dplyr 1.0.8
## v tidyr 1.2.0 v stringr 1.4.0
## v readr 2.1.2 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(broom)
Read in raw data from RDS.
raw_data <- readRDS("./n1_n2_cleaned_cases.rds")
Make a few small modifications to names and data for visualizations.
final_data <- raw_data %>% mutate(log_copy_per_L = log10(mean_copy_num_L)) %>%
rename(Facility = wrf) %>%
mutate(Facility = recode(Facility,
"NO" = "WRF A",
"MI" = "WRF B",
"CC" = "WRF C"))
Seperate the data by gene target to ease layering in the final plot
#make three data layers
only_positives <<- subset(final_data, (!is.na(final_data$Facility)))
only_n1 <- subset(only_positives, target == "N1")
only_n2 <- subset(only_positives, target == "N2")
only_background <<-final_data %>%
select(c(date, cases_cum_clarke, new_cases_clarke, X7_day_ave_clarke)) %>%
group_by(date) %>% summarise_if(is.numeric, mean)
#specify fun colors
background_color <- "#7570B3"
seven_day_ave_color <- "#E6AB02"
marker_colors <- c("N1" = '#1B9E77',"N2" ='#D95F02')
#remove facilty C for now
#only_n1 <- only_n1[!(only_n1$Facility == "WRF C"),]
#only_n2 <- only_n2[!(only_n2$Facility == "WRF C"),]
only_n1 <- only_n1[!(only_n1$Facility == "WRF A" & only_n1$date == "2020-11-02"), ]
only_n2 <- only_n2[!(only_n2$Facility == "WRF A" & only_n2$date == "2020-11-02"), ]
Build the main plot
#first layer is the background epidemic curve
p1 <- only_background %>%
plotly::plot_ly() %>%
plotly::add_trace(x = ~date, y = ~new_cases_clarke,
type = "bar",
hoverinfo = "text",
text = ~paste('</br> Date: ', date,
'</br> Daily Cases: ', new_cases_clarke),
alpha = 0.5,
name = "Daily Reported Cases",
color = background_color,
colors = background_color,
showlegend = FALSE) %>%
layout(yaxis = list(title = "Clarke County Daily Cases", showline=TRUE)) %>%
layout(legend = list(orientation = "h", x = 0.2, y = -0.3))
#renders the main plot layer two as seven day moving average
p1 <- p1 %>% plotly::add_trace(x = ~date, y = ~X7_day_ave_clarke,
type = "scatter",
mode = "lines",
hoverinfo = "text",
text = ~paste('</br> Date: ', date,
'</br> Seven-Day Moving Average: ', X7_day_ave_clarke),
name = "Seven Day Moving Average Athens",
line = list(color = seven_day_ave_color),
showlegend = FALSE)
#renders the main plot layer three as positive target hits
p2 <- plotly::plot_ly() %>%
plotly::add_trace(x = ~date, y = ~mean_copy_num_L,
type = "scatter",
mode = "markers",
hoverinfo = "text",
text = ~paste('</br> Date: ', date,
'</br> Facility: ', Facility,
'</br> Target: ', target,
'</br> Copies/L: ', round(mean_copy_num_L, digits = 2)),
data = only_n1,
symbol = ~Facility,
marker = list(color = '#1B9E77', size = 8, opacity = 0.65),
showlegend = FALSE) %>%
plotly::add_trace(x = ~date, y = ~mean_copy_num_L,
type = "scatter",
mode = "markers",
hoverinfo = "text",
text = ~paste('</br> Date: ', date,
'</br> Facility: ', Facility,
'</br> Target: ', target,
'</br> Copies/L: ', round(mean_copy_num_L, digits = 2)),
data = only_n2,
symbol = ~Facility,
marker = list(color = '#D95F02', size = 8, opacity = 0.65),
showlegend = FALSE) %>%
layout(yaxis = list(title = "SARS CoV-2 Copies/L",
showline = TRUE,
type = "log",
dtick = 1,
automargin = TRUE)) %>%
layout(legend = list(orientation = "h", x = 0.2, y = -0.3))
#adds the limit of detection dashed line
p2 <- p2 %>% plotly::add_segments(x = as.Date("2020-03-14"),
xend = ~max(date + 10),
y = 3571.429, yend = 3571.429,
opacity = 0.35,
line = list(color = "black", dash = "dash")) %>%
layout(annotations = list(x = as.Date("2020-03-28"), y = 3.8, xref = "x", yref = "y",
text = "Limit of Detection", showarrow = FALSE))
p1
p2
Combine the two main plot pieces as a subplot
#seperate n1 and n2 frames by site
#n1
wrf_a_only_n1 <- subset(only_n1, Facility == "WRF A")
wrf_b_only_n1 <- subset(only_n1, Facility == "WRF B")
wrf_c_only_n1 <- subset(only_n1, Facility == "WRF C")
#n2
wrf_a_only_n2 <- subset(only_n2, Facility == "WRF A")
wrf_b_only_n2 <- subset(only_n2, Facility == "WRF B")
wrf_c_only_n2 <- subset(only_n2, Facility == "WRF C")
#rejoin the old data frames then seperate in to averages for each plant.
wrfa_both <- full_join(wrf_a_only_n1, wrf_a_only_n2)%>%
select(c(date, mean_total_copies)) %>%
group_by(date) %>%
summarize_if(is.numeric, mean) %>%
ungroup() %>%
mutate(log_total_copies_both = log10(mean_total_copies))
## Joining, by = c("date", "new_cases_clarke", "cases_cum_clarke",
## "X7_day_ave_clarke", "Facility", "collection_num", "target",
## "mean_copy_num_uL_rxn", "mean_copy_num_L", "sd_L", "se_L", "mean_total_copies",
## "sd_total_copies", "lo_95", "up_95", "log_copy_per_L")
wrfb_both <- full_join(wrf_b_only_n1, wrf_b_only_n2)%>%
select(c(date, mean_total_copies)) %>%
group_by(date) %>%
summarize_if(is.numeric, mean) %>%
ungroup() %>%
mutate(log_total_copies_both = log10(mean_total_copies))
## Joining, by = c("date", "new_cases_clarke", "cases_cum_clarke",
## "X7_day_ave_clarke", "Facility", "collection_num", "target",
## "mean_copy_num_uL_rxn", "mean_copy_num_L", "sd_L", "se_L", "mean_total_copies",
## "sd_total_copies", "lo_95", "up_95", "log_copy_per_L")
wrfc_both <- full_join(wrf_c_only_n1, wrf_c_only_n2)%>%
select(c(date, mean_total_copies)) %>%
group_by(date) %>%
summarize_if(is.numeric, mean) %>%
ungroup() %>%
mutate(log_total_copies_both = log10(mean_total_copies))
## Joining, by = c("date", "new_cases_clarke", "cases_cum_clarke",
## "X7_day_ave_clarke", "Facility", "collection_num", "target",
## "mean_copy_num_uL_rxn", "mean_copy_num_L", "sd_L", "se_L", "mean_total_copies",
## "sd_total_copies", "lo_95", "up_95", "log_copy_per_L")
#get max date
maxdate <- max(wrfa_both$date)
mindate <- min(wrfa_both$date)
Build loess smoothing figures figures
This makes the individual plots
#**************************************WRF A PLOT**********************************************
#add trendlines
#extract data from geom_smooth
#both extract
# *********************************span 0.6***********************************
#*****************Must always update the n = TOTAL NUMBER OF DAYS*************************
extract_botha <- ggplot(wrfa_both, aes(x = date, y = log_total_copies_both)) +
stat_smooth(aes(outfit=fit_botha<<-..y..), method = "loess", color = '#1B9E77',
span = 0.25, n = 798)
## Warning: Ignoring unknown aesthetics: outfit
#look at the fits to align dates and total observations
#both
extract_botha
## `geom_smooth()` using formula 'y ~ x'
fit_botha
## [1] 13.05407 13.04923 13.04446 13.03974 13.03507 13.03046 13.02590 13.02140
## [9] 13.01694 13.01254 13.00819 13.00389 12.99963 12.99542 12.99126 12.98715
## [17] 12.98308 12.97906 12.97507 12.97113 12.96724 12.96338 12.95956 12.95579
## [25] 12.95205 12.94834 12.94468 12.94105 12.93745 12.93389 12.93037 12.92687
## [33] 12.92341 12.91997 12.91657 12.91319 12.90985 12.90653 12.90324 12.89997
## [41] 12.89672 12.89351 12.89031 12.88714 12.88399 12.88086 12.87776 12.87470
## [49] 12.87166 12.86866 12.86569 12.86276 12.85988 12.85703 12.85423 12.85147
## [57] 12.84876 12.84610 12.84350 12.84094 12.83845 12.83601 12.83363 12.83132
## [65] 12.82907 12.82688 12.82476 12.82272 12.82075 12.81885 12.81703 12.81528
## [73] 12.81362 12.81204 12.81055 12.80914 12.80782 12.80659 12.80546 12.80442
## [81] 12.80347 12.80263 12.80189 12.80125 12.80071 12.80023 12.79977 12.79931
## [89] 12.79887 12.79844 12.79803 12.79764 12.79728 12.79694 12.79663 12.79636
## [97] 12.79611 12.79591 12.79574 12.79561 12.79552 12.79549 12.79550 12.79556
## [105] 12.79567 12.79584 12.79607 12.79636 12.79671 12.79713 12.79761 12.79817
## [113] 12.79880 12.79950 12.80029 12.80115 12.80210 12.80313 12.80425 12.80546
## [121] 12.80676 12.80816 12.80966 12.81125 12.81295 12.81475 12.81667 12.81869
## [129] 12.82082 12.82307 12.82544 12.82793 12.83054 12.83412 12.83940 12.84623
## [137] 12.85441 12.86379 12.87419 12.88545 12.89738 12.90983 12.92261 12.93556
## [145] 12.94851 12.96129 12.97372 12.98564 12.99687 13.00724 13.01659 13.02474
## [153] 13.03152 13.03676 13.04203 13.04890 13.05725 13.06693 13.07782 13.08978
## [161] 13.10267 13.11636 13.13072 13.14560 13.16087 13.17641 13.19206 13.20770
## [169] 13.22320 13.23841 13.25320 13.26744 13.28099 13.29371 13.30548 13.31615
## [177] 13.32559 13.33367 13.34025 13.34519 13.34837 13.34964 13.34975 13.34956
## [185] 13.34905 13.34821 13.34704 13.34553 13.34366 13.34144 13.33884 13.33588
## [193] 13.33252 13.32878 13.32463 13.32007 13.31510 13.30970 13.30387 13.29759
## [201] 13.29087 13.28368 13.27603 13.26790 13.25929 13.25019 13.24059 13.23048
## [209] 13.21985 13.20870 13.19570 13.17974 13.16109 13.14003 13.11683 13.09178
## [217] 13.06516 13.03725 13.00832 12.97865 12.94853 12.91822 12.88802 12.85819
## [225] 12.82902 12.80079 12.77378 12.74826 12.72452 12.70282 12.68346 12.66418
## [233] 12.64269 12.61923 12.59406 12.56739 12.53949 12.51058 12.48091 12.45071
## [241] 12.42023 12.38971 12.35939 12.32951 12.30030 12.27201 12.24488 12.21916
## [249] 12.19507 12.17286 12.15277 12.13504 12.11929 12.10490 12.09175 12.07976
## [257] 12.06882 12.05881 12.04964 12.04120 12.03339 12.02610 12.01923 12.01267
## [265] 12.00632 12.00007 11.99382 11.98747 11.98090 11.97402 11.96673 11.95891
## [273] 11.95046 11.94128 11.93126 11.92156 11.91331 11.90638 11.90061 11.89587
## [281] 11.89201 11.88889 11.88636 11.88429 11.88252 11.88092 11.87934 11.87765
## [289] 11.87569 11.87332 11.87040 11.86680 11.86235 11.85693 11.85039 11.84258
## [297] 11.83371 11.82415 11.81396 11.80325 11.79208 11.78055 11.76874 11.75672
## [305] 11.74459 11.73243 11.72032 11.70834 11.69658 11.68512 11.67404 11.66343
## [313] 11.65338 11.64396 11.63525 11.62735 11.62033 11.61262 11.60275 11.59099
## [321] 11.57760 11.56282 11.54693 11.53018 11.51284 11.49515 11.47739 11.45981
## [329] 11.44267 11.42623 11.41075 11.39648 11.38370 11.37266 11.36361 11.35683
## [337] 11.35256 11.35106 11.35116 11.35152 11.35214 11.35307 11.35432 11.35592
## [345] 11.35788 11.36025 11.36304 11.36627 11.36996 11.37416 11.37886 11.38411
## [353] 11.38993 11.39633 11.40334 11.41100 11.41931 11.42831 11.43802 11.44847
## [361] 11.45967 11.47165 11.48444 11.49806 11.51409 11.53385 11.55702 11.58327
## [369] 11.61225 11.64363 11.67708 11.71227 11.74887 11.78653 11.82492 11.86372
## [377] 11.90258 11.94117 11.97917 12.01622 12.05201 12.08620 12.11845 12.14842
## [385] 12.17579 12.20023 12.22139 12.24223 12.26573 12.29156 12.31941 12.34897
## [393] 12.37993 12.41195 12.44474 12.47797 12.51133 12.54451 12.57719 12.60905
## [401] 12.63978 12.66906 12.69658 12.72203 12.74508 12.76543 12.78275 12.79674
## [409] 12.80856 12.81963 12.82997 12.83959 12.84853 12.85680 12.86442 12.87143
## [417] 12.87784 12.88368 12.88897 12.89373 12.89798 12.90175 12.90507 12.90794
## [425] 12.91040 12.91248 12.91418 12.91554 12.91657 12.91616 12.91325 12.90804
## [433] 12.90070 12.89142 12.88037 12.86773 12.85369 12.83842 12.82210 12.80492
## [441] 12.78705 12.76868 12.74997 12.73112 12.71231 12.69370 12.67549 12.65785
## [449] 12.64096 12.62501 12.61016 12.59661 12.58453 12.57411 12.56551 12.55680
## [457] 12.54605 12.53350 12.51935 12.50383 12.48716 12.46957 12.45128 12.43251
## [465] 12.41348 12.39442 12.37554 12.35707 12.33924 12.32225 12.30634 12.29173
## [473] 12.27864 12.26728 12.25790 12.25069 12.24457 12.23831 12.23195 12.22554
## [481] 12.21914 12.21279 12.20655 12.20046 12.19457 12.18894 12.18360 12.17862
## [489] 12.17403 12.16990 12.16626 12.16317 12.16068 12.15883 12.15768 12.15728
## [497] 12.15767 12.15890 12.16103 12.16486 12.17103 12.17937 12.18968 12.20179
## [505] 12.21549 12.23062 12.24697 12.26437 12.28263 12.30156 12.32098 12.34070
## [513] 12.36053 12.38029 12.39980 12.41885 12.43728 12.45489 12.47150 12.48692
## [521] 12.50096 12.51344 12.52418 12.53298 12.53966 12.54582 12.55310 12.56140
## [529] 12.57061 12.58062 12.59133 12.60263 12.61442 12.62658 12.63902 12.65161
## [537] 12.66426 12.67687 12.68931 12.70149 12.71330 12.72463 12.73538 12.74544
## [545] 12.75469 12.76304 12.77038 12.77661 12.78160 12.78526 12.78749 12.78816
## [553] 12.78719 12.78445 12.77985 12.77316 12.76434 12.75360 12.74111 12.72707
## [561] 12.71165 12.69506 12.67748 12.65909 12.64009 12.62066 12.60100 12.58128
## [569] 12.56169 12.54244 12.52369 12.50565 12.48849 12.47242 12.45760 12.44424
## [577] 12.42995 12.41242 12.39200 12.36904 12.34387 12.31683 12.28826 12.25850
## [585] 12.22790 12.19679 12.16551 12.13441 12.10382 12.07408 12.04554 12.01853
## [593] 11.99340 11.97047 11.95011 11.93264 11.91840 11.90480 11.88917 11.87177
## [601] 11.85284 11.83263 11.81140 11.78939 11.76686 11.74405 11.72122 11.69861
## [609] 11.67648 11.65507 11.63463 11.61542 11.59768 11.58167 11.56763 11.55582
## [617] 11.54648 11.53986 11.53564 11.53323 11.53254 11.53345 11.53587 11.53967
## [625] 11.54477 11.55104 11.55840 11.56672 11.57590 11.58584 11.59643 11.60756
## [633] 11.61913 11.63103 11.64316 11.65540 11.66766 11.67982 11.69178 11.70344
## [641] 11.71468 11.72540 11.73550 11.74487 11.75511 11.76776 11.78259 11.79935
## [649] 11.81783 11.83778 11.85898 11.88119 11.90419 11.92773 11.95160 11.97554
## [657] 11.99934 12.02276 12.04558 12.06754 12.08844 12.10802 12.12607 12.14235
## [665] 12.15662 12.17020 12.18450 12.19944 12.21495 12.23094 12.24733 12.26405
## [673] 12.28102 12.29816 12.31539 12.33263 12.34981 12.36683 12.38364 12.40014
## [681] 12.41626 12.43192 12.44704 12.46154 12.47535 12.48838 12.50055 12.51179
## [689] 12.52251 12.53316 12.54371 12.55417 12.56451 12.57472 12.58478 12.59469
## [697] 12.60443 12.61398 12.62333 12.63247 12.64138 12.65005 12.65846 12.66661
## [705] 12.67447 12.68203 12.68928 12.69621 12.70279 12.70887 12.71432 12.71918
## [713] 12.72351 12.72733 12.73071 12.73368 12.73629 12.73859 12.74062 12.74243
## [721] 12.74405 12.74555 12.74695 12.74832 12.74969 12.75110 12.75262 12.75427
## [729] 12.75610 12.75817 12.76051 12.76317 12.76619 12.76963 12.77353 12.77757
## [737] 12.78143 12.78512 12.78866 12.79207 12.79534 12.79851 12.80158 12.80456
## [745] 12.80748 12.81035 12.81317 12.81597 12.81876 12.82155 12.82436 12.82720
## [753] 12.83009 12.83303 12.83605 12.83916 12.84228 12.84533 12.84830 12.85122
## [761] 12.85407 12.85687 12.85962 12.86232 12.86497 12.86759 12.87018 12.87274
## [769] 12.87527 12.87779 12.88028 12.88277 12.88525 12.88773 12.89021 12.89269
## [777] 12.89519 12.89773 12.90034 12.90300 12.90573 12.90850 12.91131 12.91416
## [785] 12.91704 12.91995 12.92287 12.92580 12.92873 12.93167 12.93459 12.93750
## [793] 12.94039 12.94326 12.94609 12.94888 12.95162 12.95431
#assign fits to a vector
both_trenda <- fit_botha
#extract y min and max for each
limits_botha <- ggplot_build(extract_botha)$data
## `geom_smooth()` using formula 'y ~ x'
limits_botha <- as.data.frame(limits_botha)
both_ymina <- limits_botha$ymin
both_ymaxa <- limits_botha$ymax
#reassign dataframes (just to be safe)
work_botha <- wrfa_both
#fill in missing dates to smooth fits
work_botha <- work_botha %>% complete(date = seq(min(date), max(date), by = "1 day"))
date_vec_botha <- work_botha$date
#create a new smooth dataframe to layer
smooth_frame_botha <- data.frame(date_vec_botha, both_trenda, both_ymina, both_ymaxa)
#WRF A
#plot smooth frames
p_wrf_a <- plotly::plot_ly() %>%
plotly::add_lines(x = ~date_vec_botha, y = ~both_trenda,
data = smooth_frame_botha,
hoverinfo = "text",
text = ~paste('</br> Date: ', date_vec_botha,
'</br> Median Log Copies: ', round(both_trenda, digits = 2)),
line = list(color = '#1B9E77', size = 8, opacity = 0.65),
showlegend = FALSE) %>%
layout(xaxis = list(range = c(mindate - 7, maxdate + 7))) %>% #buffer here
plotly::add_ribbons(x ~date_vec_botha, ymin = ~both_ymina, ymax = ~both_ymaxa,
showlegend = FALSE,
opacity = 0.25,
hoverinfo = "text",
text = ~paste('</br> Date: ', date_vec_botha, #leaving in case we want to change
'</br> Max Log Copies: ', round(both_ymaxa, digits = 2),
'</br> Min Log Copies: ', round(both_ymina, digits = 2)),
name = "",
fillcolor = '#1B9E77',
line = list(color = '#1B9E77')) %>%
layout(yaxis = list(title = "Total Log10 SARS CoV-2 Copies",
showline = TRUE,
automargin = TRUE)) %>%
layout(xaxis = list(title = "Date")) %>%
layout(title = "WRF A") %>%
plotly::add_markers(x = ~date, y = ~log_total_copies_both,
data = wrfa_both,
hoverinfo = "text",
showlegend = FALSE,
text = ~paste('</br> Date: ', date,
'</br> Actual Log Copies: ', round(log_total_copies_both, digits = 2)),
marker = list(color = '#1B9E77', size = 6, opacity = 0.65))
p_wrf_a
save(p_wrf_a, file = "./plotly_objs/p_wrf_a.rda")
#**************************************WRF B PLOT**********************************************
#add trendlines
#extract data from geom_smooth
#both extract
# *********************************span 0.6***********************************
#*****************Must always update the n = TOTAL NUMBER OF DAYS*************************
extract_bothb <- ggplot(wrfb_both, aes(x = date, y = log_total_copies_both)) +
stat_smooth(aes(outfit=fit_bothb<<-..y..), method = "loess", color = '#D95F02',
span = 0.25, n = 798)
## Warning: Ignoring unknown aesthetics: outfit
#look at the fits to align dates and total observations
#both
extract_bothb
## `geom_smooth()` using formula 'y ~ x'
fit_bothb
## [1] 12.62461 12.61997 12.61541 12.61094 12.60657 12.60227 12.59807 12.59395
## [9] 12.58992 12.58597 12.58211 12.57833 12.57464 12.57103 12.56751 12.56407
## [17] 12.56071 12.55744 12.55425 12.55114 12.54811 12.54517 12.54231 12.53952
## [25] 12.53682 12.53420 12.53165 12.52919 12.52680 12.52450 12.52227 12.52012
## [33] 12.51804 12.51605 12.51413 12.51228 12.51052 12.50883 12.50721 12.50567
## [41] 12.50420 12.50281 12.50149 12.50025 12.49908 12.49800 12.49700 12.49608
## [49] 12.49524 12.49449 12.49382 12.49323 12.49273 12.49231 12.49199 12.49174
## [57] 12.49159 12.49152 12.49154 12.49166 12.49186 12.49215 12.49254 12.49301
## [65] 12.49358 12.49425 12.49501 12.49586 12.49681 12.49785 12.49899 12.50023
## [73] 12.50157 12.50300 12.50454 12.50617 12.50791 12.50974 12.51168 12.51372
## [81] 12.51587 12.51812 12.52047 12.52293 12.52549 12.52822 12.53116 12.53430
## [89] 12.53764 12.54117 12.54489 12.54878 12.55284 12.55706 12.56144 12.56596
## [97] 12.57063 12.57543 12.58036 12.58540 12.59056 12.59583 12.60119 12.60664
## [105] 12.61218 12.61779 12.62348 12.62922 12.63503 12.64088 12.64677 12.65270
## [113] 12.65865 12.66463 12.67061 12.67661 12.68260 12.68858 12.69455 12.70050
## [121] 12.70642 12.71230 12.71813 12.72392 12.72965 12.73531 12.74090 12.74641
## [129] 12.75234 12.75911 12.76665 12.77485 12.78363 12.79289 12.80256 12.81253
## [137] 12.82272 12.83304 12.84339 12.85368 12.86383 12.87375 12.88334 12.89251
## [145] 12.90118 12.90925 12.91663 12.92323 12.92897 12.93543 12.94416 12.95496
## [153] 12.96763 12.98197 12.99779 13.01489 13.03309 13.05217 13.07195 13.09223
## [161] 13.11282 13.13352 13.15412 13.17445 13.19430 13.21348 13.23178 13.24902
## [169] 13.26500 13.27952 13.29239 13.30342 13.31240 13.31913 13.32344 13.32616
## [177] 13.32830 13.32986 13.33085 13.33128 13.33115 13.33048 13.32927 13.32753
## [185] 13.32528 13.32251 13.31924 13.31547 13.31122 13.30649 13.30129 13.29562
## [193] 13.28951 13.28294 13.27595 13.26852 13.26068 13.25242 13.24376 13.23470
## [201] 13.22526 13.21544 13.20525 13.19470 13.18380 13.17088 13.15451 13.13502
## [209] 13.11275 13.08804 13.06122 13.03264 13.00263 12.97152 12.93966 12.90738
## [217] 12.87502 12.84291 12.81140 12.78082 12.75150 12.72379 12.69803 12.67454
## [225] 12.65367 12.63576 12.61844 12.59927 12.57845 12.55621 12.53274 12.50825
## [233] 12.48296 12.45707 12.43080 12.40435 12.37792 12.35174 12.32601 12.30094
## [241] 12.27674 12.25362 12.23178 12.21144 12.19280 12.17608 12.16148 12.14883
## [249] 12.13774 12.12811 12.11982 12.11276 12.10682 12.10189 12.09787 12.09464
## [257] 12.09209 12.09011 12.08860 12.08744 12.08652 12.08574 12.08498 12.08413
## [265] 12.08309 12.08173 12.07997 12.07767 12.07474 12.07106 12.06653 12.06103
## [273] 12.05445 12.04833 12.04413 12.04166 12.04073 12.04112 12.04265 12.04512
## [281] 12.04832 12.05206 12.05615 12.06037 12.06455 12.06846 12.07193 12.07475
## [289] 12.07672 12.07764 12.07732 12.07556 12.07216 12.06692 12.06027 12.05281
## [297] 12.04461 12.03576 12.02631 12.01634 12.00592 11.99512 11.98401 11.97267
## [305] 11.96115 11.94955 11.93792 11.92634 11.91487 11.90360 11.89258 11.88190
## [313] 11.87162 11.86181 11.85255 11.84390 11.83594 11.82677 11.81465 11.79993
## [321] 11.78294 11.76401 11.74348 11.72169 11.69898 11.67567 11.65210 11.62862
## [329] 11.60555 11.58323 11.56200 11.54220 11.52415 11.50819 11.49467 11.48391
## [337] 11.47626 11.47204 11.46981 11.46790 11.46634 11.46515 11.46434 11.46392
## [345] 11.46392 11.46436 11.46525 11.46661 11.46846 11.47082 11.47370 11.47713
## [353] 11.48111 11.48568 11.49084 11.49661 11.50302 11.51008 11.51780 11.52621
## [361] 11.53533 11.54517 11.55574 11.56708 11.58054 11.59729 11.61704 11.63950
## [369] 11.66438 11.69140 11.72027 11.75071 11.78241 11.81511 11.84850 11.88230
## [377] 11.91622 11.94998 11.98329 12.01586 12.04740 12.07762 12.10624 12.13297
## [385] 12.15752 12.17960 12.19893 12.21817 12.23998 12.26407 12.29014 12.31790
## [393] 12.34705 12.37729 12.40833 12.43988 12.47163 12.50330 12.53458 12.56519
## [401] 12.59482 12.62318 12.64997 12.67491 12.69769 12.71801 12.73559 12.75012
## [409] 12.76320 12.77656 12.79010 12.80373 12.81738 12.83094 12.84434 12.85749
## [417] 12.87029 12.88266 12.89452 12.90576 12.91631 12.92608 12.93498 12.94292
## [425] 12.94981 12.95556 12.96010 12.96332 12.96514 12.96487 12.96199 12.95669
## [433] 12.94915 12.93955 12.92809 12.91495 12.90031 12.88435 12.86727 12.84926
## [441] 12.83048 12.81114 12.79141 12.77148 12.75154 12.73177 12.71236 12.69349
## [449] 12.67534 12.65811 12.64198 12.62713 12.61375 12.60203 12.59214 12.58182
## [457] 12.56885 12.55353 12.53615 12.51701 12.49640 12.47461 12.45193 12.42867
## [465] 12.40511 12.38155 12.35829 12.33560 12.31380 12.29317 12.27400 12.25660
## [473] 12.24125 12.22824 12.21788 12.21045 12.20435 12.19784 12.19098 12.18386
## [481] 12.17656 12.16916 12.16174 12.15438 12.14716 12.14015 12.13345 12.12712
## [489] 12.12125 12.11592 12.11121 12.10720 12.10396 12.10158 12.10014 12.09972
## [497] 12.10039 12.10224 12.10535 12.11045 12.11810 12.12811 12.14028 12.15443
## [505] 12.17035 12.18786 12.20677 12.22687 12.24799 12.26992 12.29247 12.31546
## [513] 12.33868 12.36195 12.38507 12.40785 12.43010 12.45162 12.47223 12.49172
## [521] 12.50991 12.52661 12.54161 12.55474 12.56579 12.57689 12.59015 12.60539
## [529] 12.62243 12.64108 12.66116 12.68248 12.70487 12.72814 12.75210 12.77658
## [537] 12.80138 12.82632 12.85122 12.87590 12.90018 12.92386 12.94676 12.96871
## [545] 12.98951 13.00899 13.02695 13.04322 13.05762 13.06995 13.08004 13.08770
## [553] 13.09274 13.09499 13.09426 13.09070 13.08473 13.07653 13.06630 13.05424
## [561] 13.04054 13.02540 13.00901 12.99156 12.97326 12.95429 12.93485 12.91514
## [569] 12.89535 12.87567 12.85630 12.83744 12.81927 12.80201 12.78583 12.77093
## [577] 12.75471 12.73466 12.71119 12.68468 12.65552 12.62410 12.59082 12.55605
## [585] 12.52020 12.48365 12.44678 12.41000 12.37369 12.33824 12.30403 12.27147
## [593] 12.24094 12.21282 12.18752 12.16541 12.14689 12.12867 12.10744 12.08354
## [601] 12.05733 12.02916 11.99939 11.96837 11.93646 11.90400 11.87134 11.83886
## [609] 11.80688 11.77578 11.74590 11.71759 11.69121 11.66712 11.64565 11.62718
## [617] 11.61205 11.60061 11.59181 11.58431 11.57807 11.57302 11.56911 11.56628
## [625] 11.56448 11.56366 11.56377 11.56473 11.56651 11.56904 11.57228 11.57616
## [633] 11.58063 11.58564 11.59113 11.59705 11.60334 11.60995 11.61682 11.62390
## [641] 11.63113 11.63845 11.64582 11.65318 11.66217 11.67427 11.68920 11.70666
## [649] 11.72636 11.74802 11.77135 11.79605 11.82183 11.84841 11.87550 11.90280
## [657] 11.93002 11.95688 11.98309 12.00835 12.03238 12.05488 12.07557 12.09416
## [665] 12.11035 12.12602 12.14315 12.16159 12.18121 12.20185 12.22339 12.24568
## [673] 12.26858 12.29194 12.31563 12.33951 12.36344 12.38727 12.41086 12.43408
## [681] 12.45677 12.47881 12.50005 12.52035 12.53956 12.55755 12.57418 12.58931
## [689] 12.60356 12.61766 12.63159 12.64537 12.65898 12.67241 12.68566 12.69873
## [697] 12.71160 12.72428 12.73676 12.74903 12.76108 12.77292 12.78454 12.79592
## [705] 12.80708 12.81799 12.82865 12.83907 12.84923 12.85908 12.86861 12.87781
## [713] 12.88671 12.89531 12.90364 12.91171 12.91953 12.92712 12.93448 12.94164
## [721] 12.94861 12.95541 12.96204 12.96853 12.97488 12.98112 12.98725 12.99329
## [729] 12.99925 13.00515 13.01101 13.01684 13.02264 13.02844 13.03426 13.03999
## [737] 13.04553 13.05088 13.05606 13.06106 13.06588 13.07053 13.07501 13.07933
## [745] 13.08348 13.08747 13.09131 13.09499 13.09852 13.10191 13.10515 13.10825
## [753] 13.11121 13.11404 13.11674 13.11930 13.12172 13.12397 13.12605 13.12796
## [761] 13.12970 13.13128 13.13270 13.13396 13.13507 13.13601 13.13681 13.13745
## [769] 13.13794 13.13828 13.13848 13.13853 13.13844 13.13821 13.13784 13.13734
## [777] 13.13670 13.13592 13.13502 13.13399 13.13283 13.13154 13.13011 13.12854
## [785] 13.12684 13.12499 13.12301 13.12088 13.11861 13.11619 13.11362 13.11091
## [793] 13.10804 13.10502 13.10185 13.09852 13.09503 13.09139
#assign fits to a vector
both_trendb <- fit_bothb
#extract y min and max for each
limits_bothb <- ggplot_build(extract_bothb)$data
## `geom_smooth()` using formula 'y ~ x'
limits_bothb <- as.data.frame(limits_bothb)
both_yminb <- limits_bothb$ymin
both_ymaxb <- limits_bothb$ymax
#reassign dataframes (just to be safe)
work_bothb <- wrfb_both
#fill in missing dates to smooth fits
work_bothb <- work_bothb %>% complete(date = seq(min(date), max(date), by = "1 day"))
date_vec_bothb <- work_bothb$date
#create a new smooth dataframe to layer
smooth_frame_bothb <- data.frame(date_vec_bothb, both_trendb, both_yminb, both_ymaxb)
#WRF B
#plot smooth frames
p_wrf_b <- plotly::plot_ly() %>%
plotly::add_lines(x = ~date_vec_bothb, y = ~both_trendb,
data = smooth_frame_bothb,
hoverinfo = "text",
text = ~paste('</br> Date: ', date_vec_bothb,
'</br> Median Log Copies: ', round(both_trendb, digits = 2)),
line = list(color = '#D95F02', size = 8, opacity = 0.65),
showlegend = FALSE) %>%
layout(xaxis = list(range = c(mindate - 7, maxdate + 7))) %>% #buffer here
plotly::add_ribbons(x ~date_vec_bothb, ymin = ~both_yminb, ymax = ~both_ymaxb,
showlegend = FALSE,
opacity = 0.25,
hoverinfo = "text",
text = ~paste('</br> Date: ', date_vec_bothb, #leaving in case we want to change
'</br> Max Log Copies: ', round(both_ymaxb, digits = 2),
'</br> Min Log Copies: ', round(both_yminb, digits = 2)),
name = "",
fillcolor = '#D95F02',
line = list(color = '#D95F02')) %>%
layout(yaxis = list(title = "Total Log10 SARS CoV-2 Copies",
showline = TRUE,
automargin = TRUE)) %>%
layout(xaxis = list(title = "Date")) %>%
layout(title = "WRF B") %>%
plotly::add_markers(x = ~date, y = ~log_total_copies_both,
data = wrfb_both,
hoverinfo = "text",
showlegend = FALSE,
text = ~paste('</br> Date: ', date,
'</br> Actual Log Copies: ', round(log_total_copies_both, digits = 2)),
marker = list(color = '#D95F02', size = 6, opacity = 0.65))
p_wrf_b
save(p_wrf_b, file = "./plotly_objs/p_wrf_b.rda")
#**************************************WRF C PLOT********************************************** #add trendlines #extract data from geom_smooth # *********************************span 0.6*********************************** #*****************Must always update the n = TOTAL NUMBER OF DAYS*************************
extract_bothc <- ggplot(wrfc_both, aes(x = date, y = log_total_copies_both)) +
stat_smooth(aes(outfit=fit_bothc<<-..y..), method = "loess", color = '#E7298A',
span = 0.25, n = 798)
## Warning: Ignoring unknown aesthetics: outfit
#look at the fits to align dates and total observations
#both
extract_bothc
## `geom_smooth()` using formula 'y ~ x'
fit_bothc
## [1] 12.05831 12.05150 12.04479 12.03817 12.03165 12.02523 12.01890 12.01266
## [9] 12.00652 12.00047 11.99451 11.98864 11.98286 11.97717 11.97157 11.96606
## [17] 11.96063 11.95529 11.95003 11.94486 11.93976 11.93475 11.92983 11.92498
## [25] 11.92021 11.91552 11.91091 11.90637 11.90192 11.89753 11.89322 11.88899
## [33] 11.88482 11.88073 11.87671 11.87276 11.86888 11.86507 11.86133 11.85765
## [41] 11.85404 11.85049 11.84701 11.84359 11.84023 11.83694 11.83370 11.83053
## [49] 11.82741 11.82435 11.82136 11.81844 11.81559 11.81282 11.81012 11.80750
## [57] 11.80496 11.80251 11.80014 11.79786 11.79566 11.79356 11.79155 11.78963
## [65] 11.78781 11.78608 11.78446 11.78294 11.78152 11.78021 11.77900 11.77791
## [73] 11.77692 11.77605 11.77530 11.77466 11.77414 11.77374 11.77347 11.77332
## [81] 11.77330 11.77340 11.77364 11.77401 11.77451 11.77515 11.77593 11.77685
## [89] 11.77791 11.77911 11.78046 11.78196 11.78358 11.78528 11.78706 11.78894
## [97] 11.79091 11.79298 11.79516 11.79743 11.79982 11.80232 11.80494 11.80767
## [105] 11.81053 11.81351 11.81662 11.81987 11.82325 11.82678 11.83044 11.83426
## [113] 11.83822 11.84234 11.84662 11.85106 11.85566 11.86044 11.86538 11.87050
## [121] 11.87580 11.88128 11.88694 11.89280 11.89884 11.90509 11.91153 11.91818
## [129] 11.92503 11.93210 11.93938 11.94687 11.95459 11.96374 11.97540 11.98932
## [137] 12.00526 12.02296 12.04220 12.06272 12.08429 12.10666 12.12959 12.15284
## [145] 12.17616 12.19931 12.22205 12.24414 12.26533 12.28538 12.30405 12.32110
## [153] 12.33628 12.34934 12.36259 12.37832 12.39632 12.41638 12.43830 12.46186
## [161] 12.48686 12.51307 12.54029 12.56831 12.59692 12.62591 12.65507 12.68418
## [169] 12.71304 12.74143 12.76915 12.79598 12.82172 12.84615 12.86905 12.89024
## [177] 12.90948 12.92657 12.94130 12.95345 12.96283 12.96921 12.97332 12.97606
## [185] 12.97748 12.97764 12.97661 12.97444 12.97118 12.96690 12.96166 12.95551
## [193] 12.94851 12.94072 12.93219 12.92299 12.91318 12.90281 12.89193 12.88062
## [201] 12.86892 12.85690 12.84461 12.83212 12.81947 12.80673 12.79395 12.78121
## [209] 12.76854 12.75601 12.74151 12.72315 12.70129 12.67634 12.64866 12.61865
## [217] 12.58669 12.55316 12.51845 12.48293 12.44700 12.41103 12.37541 12.34053
## [225] 12.30676 12.27449 12.24411 12.21599 12.19052 12.16809 12.14908 12.13125
## [233] 12.11222 12.09213 12.07111 12.04930 12.02684 12.00387 11.98052 11.95693
## [241] 11.93323 11.90958 11.88609 11.86292 11.84020 11.81806 11.79665 11.77609
## [249] 11.75654 11.73812 11.72098 11.70524 11.69090 11.67778 11.66578 11.65479
## [257] 11.64473 11.63550 11.62700 11.61912 11.61178 11.60488 11.59831 11.59198
## [265] 11.58580 11.57966 11.57347 11.56712 11.56053 11.55360 11.54622 11.53830
## [273] 11.52974 11.52045 11.51032 11.50037 11.49159 11.48389 11.47715 11.47126
## [281] 11.46614 11.46166 11.45773 11.45424 11.45107 11.44814 11.44533 11.44254
## [289] 11.43965 11.43658 11.43320 11.42942 11.42513 11.42023 11.41460 11.40815
## [297] 11.40090 11.39300 11.38453 11.37558 11.36621 11.35651 11.34657 11.33645
## [305] 11.32625 11.31603 11.30587 11.29587 11.28609 11.27661 11.26752 11.25890
## [313] 11.25082 11.24337 11.23661 11.23064 11.22553 11.21958 11.21122 11.20073
## [321] 11.18840 11.17451 11.15934 11.14317 11.12630 11.10899 11.09155 11.07424
## [329] 11.05736 11.04118 11.02599 11.01208 10.99972 10.98920 10.98080 10.97481
## [337] 10.97151 10.97118 10.97306 10.97617 10.98043 10.98580 10.99222 10.99963
## [345] 11.00796 11.01717 11.02719 11.03797 11.04945 11.06156 11.07426 11.08748
## [353] 11.10117 11.11526 11.12970 11.14443 11.15940 11.17454 11.18980 11.20511
## [361] 11.22042 11.23568 11.25082 11.26578 11.28217 11.30145 11.32335 11.34762
## [369] 11.37399 11.40220 11.43198 11.46308 11.49523 11.52818 11.56165 11.59539
## [377] 11.62913 11.66262 11.69559 11.72778 11.75892 11.78876 11.81703 11.84347
## [385] 11.86782 11.88982 11.90920 11.92807 11.94856 11.97047 11.99359 12.01773
## [393] 12.04267 12.06822 12.09417 12.12032 12.14646 12.17239 12.19791 12.22281
## [401] 12.24689 12.26994 12.29176 12.31215 12.33090 12.34781 12.36268 12.37530
## [409] 12.38653 12.39734 12.40774 12.41773 12.42729 12.43644 12.44517 12.45348
## [417] 12.46136 12.46882 12.47584 12.48244 12.48861 12.49434 12.49963 12.50449
## [425] 12.50890 12.51288 12.51641 12.51949 12.52213 12.52371 12.52367 12.52214
## [433] 12.51920 12.51498 12.50958 12.50310 12.49566 12.48735 12.47828 12.46856
## [441] 12.45830 12.44760 12.43656 12.42530 12.41393 12.40254 12.39124 12.38014
## [449] 12.36935 12.35898 12.34912 12.33988 12.33138 12.32372 12.31700 12.30976
## [457] 12.30061 12.28974 12.27735 12.26364 12.24882 12.23308 12.21662 12.19965
## [465] 12.18236 12.16494 12.14761 12.13057 12.11400 12.09811 12.08311 12.06919
## [473] 12.05655 12.04538 12.03590 12.02830 12.02116 12.01298 12.00392 11.99409
## [481] 11.98363 11.97266 11.96132 11.94974 11.93805 11.92637 11.91483 11.90358
## [489] 11.89273 11.88241 11.87276 11.86391 11.85599 11.84912 11.84344 11.83907
## [497] 11.83615 11.83480 11.83517 11.83732 11.84117 11.84661 11.85351 11.86176
## [505] 11.87122 11.88177 11.89331 11.90569 11.91881 11.93254 11.94676 11.96135
## [513] 11.97619 11.99114 12.00611 12.02095 12.03556 12.04980 12.06356 12.07671
## [521] 12.08914 12.10072 12.11134 12.12086 12.12917 12.13773 12.14799 12.15981
## [529] 12.17307 12.18761 12.20330 12.22001 12.23759 12.25592 12.27484 12.29423
## [537] 12.31395 12.33386 12.35382 12.37369 12.39335 12.41264 12.43144 12.44960
## [545] 12.46699 12.48347 12.49890 12.51315 12.52608 12.53755 12.54742 12.55556
## [553] 12.56182 12.56608 12.56819 12.56881 12.56872 12.56794 12.56652 12.56450
## [561] 12.56193 12.55883 12.55525 12.55123 12.54680 12.54202 12.53691 12.53151
## [569] 12.52588 12.52004 12.51403 12.50790 12.50169 12.49542 12.48915 12.48292
## [577] 12.47519 12.46460 12.45144 12.43597 12.41850 12.39929 12.37862 12.35679
## [585] 12.33406 12.31072 12.28706 12.26334 12.23986 12.21690 12.19473 12.17363
## [593] 12.15390 12.13580 12.11963 12.10565 12.09416 12.08256 12.06829 12.05164
## [601] 12.03292 12.01241 11.99043 11.96727 11.94323 11.91861 11.89370 11.86882
## [609] 11.84425 11.82030 11.79726 11.77544 11.75514 11.73664 11.72027 11.70630
## [617] 11.69504 11.68680 11.68078 11.67594 11.67222 11.66956 11.66791 11.66719
## [625] 11.66734 11.66832 11.67004 11.67245 11.67549 11.67910 11.68322 11.68777
## [633] 11.69271 11.69797 11.70348 11.70919 11.71503 11.72095 11.72687 11.73275
## [641] 11.73851 11.74409 11.74944 11.75448 11.76046 11.76851 11.77844 11.79003
## [649] 11.80310 11.81744 11.83285 11.84914 11.86611 11.88355 11.90127 11.91906
## [657] 11.93674 11.95409 11.97093 11.98704 12.00224 12.01631 12.02907 12.04031
## [665] 12.04984 12.05885 12.06862 12.07907 12.09012 12.10170 12.11372 12.12610
## [673] 12.13877 12.15164 12.16464 12.17769 12.19070 12.20360 12.21631 12.22875
## [681] 12.24084 12.25250 12.26365 12.27422 12.28412 12.29327 12.30159 12.30901
## [689] 12.31581 12.32233 12.32859 12.33460 12.34039 12.34596 12.35133 12.35652
## [697] 12.36154 12.36642 12.37115 12.37577 12.38029 12.38471 12.38907 12.39337
## [705] 12.39763 12.40186 12.40609 12.41032 12.41457 12.41863 12.42226 12.42551
## [713] 12.42840 12.43097 12.43325 12.43527 12.43707 12.43866 12.44009 12.44139
## [721] 12.44259 12.44371 12.44480 12.44588 12.44699 12.44815 12.44940 12.45076
## [729] 12.45228 12.45398 12.45590 12.45806 12.46049 12.46324 12.46633 12.46953
## [737] 12.47260 12.47557 12.47842 12.48119 12.48387 12.48649 12.48905 12.49155
## [745] 12.49402 12.49646 12.49889 12.50131 12.50374 12.50619 12.50867 12.51118
## [753] 12.51374 12.51637 12.51906 12.52184 12.52464 12.52740 12.53010 12.53277
## [761] 12.53541 12.53801 12.54059 12.54315 12.54569 12.54822 12.55074 12.55326
## [769] 12.55578 12.55831 12.56085 12.56341 12.56598 12.56858 12.57121 12.57388
## [777] 12.57658 12.57934 12.58215 12.58503 12.58796 12.59094 12.59396 12.59702
## [785] 12.60012 12.60325 12.60640 12.60958 12.61277 12.61597 12.61919 12.62240
## [793] 12.62562 12.62882 12.63202 12.63521 12.63837 12.64151
#assign fits to a vector
both_trendc <- fit_bothc
#extract y min and max for each
limits_bothc <- ggplot_build(extract_bothc)$data
## `geom_smooth()` using formula 'y ~ x'
limits_bothc <- as.data.frame(limits_bothc)
both_yminc <- limits_bothc$ymin
both_ymaxc <- limits_bothc$ymax
#reassign dataframes (just to be safe)
work_bothc <- wrfc_both
#fill in missing dates to smooth fits
work_bothc <- work_bothc %>% complete(date = seq(min(date), max(date), by = "1 day"))
date_vec_bothc <- work_bothc$date
#create a new smooth dataframe to layer
smooth_frame_bothc <- data.frame(date_vec_bothc, both_trendc, both_yminc, both_ymaxc)
#WRF C
#plot smooth frames
p_wrf_c <- plotly::plot_ly() %>%
plotly::add_lines(x = ~date_vec_bothc, y = ~both_trendc,
data = smooth_frame_bothc,
hoverinfo = "text",
text = ~paste('</br> Date: ', date_vec_bothc,
'</br> Median Log Copies: ', round(both_trendc, digits = 2)),
line = list(color = '#E7298A', size = 8, opacity = 0.65),
showlegend = FALSE) %>%
layout(xaxis = list(range = c(mindate - 7, maxdate + 7))) %>% #buffer here
plotly::add_ribbons(x ~date_vec_bothc, ymin = ~both_yminc, ymax = ~both_ymaxc,
showlegend = FALSE,
opacity = 0.25,
hoverinfo = "text",
text = ~paste('</br> Date: ', date_vec_bothc, #leaving in case we want to change
'</br> Max Log Copies: ', round(both_ymaxc, digits = 2),
'</br> Min Log Copies: ', round(both_yminc, digits = 2)),
name = "",
fillcolor = '#E7298A',
line = list(color = '#E7298A')) %>%
layout(yaxis = list(title = "Total Log10 SARS CoV-2 Copies",
showline = TRUE,
automargin = TRUE)) %>%
layout(xaxis = list(title = "Date")) %>%
layout(title = "WRF C") %>%
plotly::add_markers(x = ~date, y = ~log_total_copies_both,
data = wrfc_both,
hoverinfo = "text",
showlegend = FALSE,
text = ~paste('</br> Date: ', date,
'</br> Actual Log Copies: ', round(log_total_copies_both, digits = 2)),
marker = list(color = '#E7298A', size = 6, opacity = 0.65))
p_wrf_c
save(p_wrf_c, file = "./plotly_objs/p_wrf_c.rda")
save(wrfa_both, file = "./plotly_objs/wrfa_both.rda")
save(wrfb_both, file = "./plotly_objs/wrfb_both.rda")
save(wrfc_both, file = "./plotly_objs/wrfc_both.rda")
save(date_vec_botha, file = "./plotly_objs/date_vec_botha.rda")
save(date_vec_bothb, file = "./plotly_objs/date_vec_bothb.rda")
save(date_vec_bothc, file = "./plotly_objs/date_vec_bothc.rda")
save(both_ymina, file = "./plotly_objs/both_ymina.rda")
save(both_ymaxa, file = "./plotly_objs/both_ymaxa.rda")
save(both_yminb, file = "./plotly_objs/both_yminb.rda")
save(both_ymaxb, file = "./plotly_objs/both_ymaxb.rda")
save(both_yminc, file = "./plotly_objs/both_yminc.rda")
save(both_ymaxc, file = "./plotly_objs/both_ymaxc.rda")